package com.zhms.cape

class CarTest extends GroovyTestCase{

    def car
    void setUp(){
        car = new Car()
    }
    void testInitialize(){
        assertEquals 0, car.miles
    }

    void testDrive(){
        car.drive(10)
        assertEquals 10, car.miles
    }

    void testDriveNegativeInput(){
        try{
            car.dirve(-10)
        }catch(Exception ex){
            assertTrue true
        }

    }







}
